package org.leiyang.gateway.service;

import org.leiyang.common.dtos.LoginUser;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import reactivefeign.spring.config.ReactiveFeignClient;
import reactor.core.publisher.Mono;

/**
 * feign方式远程调用
 */
@ReactiveFeignClient(value = "mise-business-2", path = "user")
public interface RemoteService {

    /**
     * 解析token
     */
    @GetMapping(value = "/decrypt", produces= MediaType.APPLICATION_JSON_VALUE, consumes = "text/plain;charset=UTF-8")
    Mono<LoginUser> parseToken(@RequestParam("token") String token);
}
